﻿/*
   RxInputManager
   Copyright 2011 Jordan Neumeyer

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
   File: NoKeyboard.cs 
 */
using System.Reactive.Linq;
using Microsoft.Xna.Framework.Input;
using RxInputManager.Interfaces;
using System.Collections.Generic;

namespace RxInputManager.Devices
{
    public class NoKeyboard : RxDevice<KeyboardState>, IRxKeyboard
    {

        public NoKeyboard()
            : base()
        {
            //baseEvent = null;
        }

        public override bool IsAttached
        {
            get { return false; }
        }

        protected override KeyboardState CurrentState
        {
            get { return new KeyboardState(); }
        }

        public override void Update()
        {
            
        }

        public System.IObservable<KeyboardState> KeyPressed(Keys state)
        {
            return Observable.Never<KeyboardState>();
        }

        public System.IObservable<KeyboardState> KeyHeld(Keys state, int delay = RxInputManager.Constants.DelayTime)
        {
            return Observable.Never<KeyboardState>();
        }

        public System.IObservable<KeyboardState> KeyReleased(Keys state)
        {
            return Observable.Never<KeyboardState>();
        }

        public System.IObservable<Keys> Keys
        {
            get { return Observable.Never<Keys>(); }
        }

        public System.IObservable<KeyboardState> RawState
        {
            get { return Observable.Never<KeyboardState>(); }
        }


        public System.IObservable<KeyboardState> KeysHeld(HashSet<Keys> keys, int delay = RxInputManager.Constants.DelayTime)
        {
            return Observable.Never<KeyboardState>();
        }

        public System.IObservable<Keys> KeysPressed(HashSet<Keys> keys)
        {
            return Observable.Never<Keys>();
        }


        public System.IObservable<Keys> KeysPressed(params Keys[] states)
        {
            return Observable.Never<Keys>();
        }


        public System.IObservable<KeyboardState> KeyPressedOnce(Keys state)
        {
            return Observable.Never<KeyboardState>();
        }


        public System.IObservable<char> CharsEntered
        {
            get { throw new System.NotImplementedException(); }
        }

        public System.IObservable<char> CharsEnteredUntil(Keys key)
        {
            throw new System.NotImplementedException();
        }
    }
}
